package com.zbkj.crmeb.chant.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 渠道商户表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_channel_merchant")
@ApiModel(value = "ChannelMerchant对象", description = "渠道商户表")
public class ChannelMerchantDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "渠道id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "渠道类型 1: SaaS 2: 固定选品  3: 供应商 8: 海外商户 9: 开放平台")
    private Integer channelType;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "平台加价率")
    private BigDecimal markupRate;

    @ApiModelProperty(value = "渠道名称")
    @NotBlank(message = "渠道名称不能为空")
    private String channelName;

    @ApiModelProperty(value = "联系人")
    @NotBlank(message = "联系人不能为空")
    private String contactPerson;

    @ApiModelProperty(value = "联系电话区号")
    @NotBlank(message = "联系电话区号不能为空")
    private String areaCode;

    @ApiModelProperty(value = "联系电话")
    @NotBlank(message = "联系电话不能为空")
    private String contactPhone;

    @ApiModelProperty(value = "可见品牌")
    private String brandIds;

    @ApiModelProperty(value = "可见供应商")
    private String suppliersIds;

    @ApiModelProperty(value = "展示供应商")
    private String showSuppliersIds;
    
    @ApiModelProperty(value = "商户号")
    private String merchantNo;
    
    @ApiModelProperty(value = "商户秘钥")
    private String merchantSecret;

    @ApiModelProperty(value = "运费模板id(1:大陆 2:港澳 3:意大利)")
    @NotBlank(message = "发货地不能为空")
    private String tempId;
    
    @ApiModelProperty(value = "收件详细地址,省+市+区+门牌号相加成完整地址")
    @NotBlank(message = "收货详细地址不能为空")
    private String detail;

    @ApiModelProperty(value = "收件人姓名")
    @NotBlank(message = "收件人姓名不能为空")
    private String consigneeName;

    @ApiModelProperty(value = "收件人号码")
    @NotBlank(message = "收件人号码不能为空")
    private String consigneePhone;

    @ApiModelProperty(value = "商户回调地址")
    private String backUrl;
    
    @ApiModelProperty(value = "物流介绍图")
    private String logisticsImage;

    @ApiModelProperty(value = "店铺介绍图")
    private String storeImage;
    
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "是否删除")
    private Boolean isDel;
    
    @ApiModelProperty(value = "账户冻结状态, 1为冻结 0 为正常")
    private Boolean status;
    
    @ApiModelProperty(value = "账户金额")
    private BigDecimal account;
    
    @ApiModelProperty(value = "账户类型 0: 月结 1: 预充值")
    @NotNull(message = "账户类型不能为空")
    private Integer accountType;
    
    @ApiModelProperty(value = "可提现金额")
    private BigDecimal withdrawAccount;
    
    @ApiModelProperty(value = "冻结金额")
    private BigDecimal freezeAccount;
    
    @ApiModelProperty(value = "累计交易金额")
    private BigDecimal totalMoney;
    
    @ApiModelProperty(value = "累计已结算金额")
    private BigDecimal closeMoney;
    
    @ApiModelProperty(value = "账户预警金额")
    private BigDecimal warnMoney;
    
    @ApiModelProperty(value = "收款账户名")
    @NotBlank(message = "收款账户名不能为空")
    private String bankName;
    
    @ApiModelProperty(value = "收款账户号")
    @NotBlank(message = "收款账户号不能为空")
    private String bankNo;
    
    @ApiModelProperty(value = "开户行")
    @NotBlank(message = "开户行不能为空")
    private String createBank;

    @ApiModelProperty(value = "是否自动上架（0否  1是）")
    @NotNull(message = "是否自动上架不能为空")
    private Integer automaticShelves;

    @ApiModelProperty(value = "是否启用积分抵扣（0否  1是）")
    private Integer enableIntegral;

    @ApiModelProperty(value = "销售类型 0-2b 1-2c")
    private Integer appletType;

    @ApiModelProperty(value = "是否自提（0否  1是）")
    @NotNull(message = "是否自提不能为空")
    private Integer isTake;

    @ApiModelProperty(value = "是否展示折扣（0否  1是）")
    @NotNull(message = "是否展示折扣")
    private Integer showDiscount;

    @ApiModelProperty(value = "首页样式配置：（信息流|瀑布流|推荐图）0/1/2")
    @NotNull(message = "首页样式配置不能为空")
    private Integer indexConfig;

    @ApiModelProperty(value = "商品详情配置（单/多供应商）：0/1")
    @NotNull(message = "商品详情配置不能为空")
    private Integer productDetailConfig;

    @ApiModelProperty(value = "是否展示供应商：0:否，1：是展示全部，2仅展示关联供应商")
    @NotNull(message = "是否展示供应商配置不能为空")
    private Integer showSupplier;

    @ApiModelProperty(value = "商户归属类型：0:平台  1：一级供应商 2：二级供应商",allowableValues = "range[0,1,2]")
    @NotNull(message = "商户归属类型不能为空")
    private Integer agentType;

    @ApiModelProperty(value = "服务商id , 平台传0")
    @NotNull(message = "服务商id不能为空")
    private Integer agentId;

    @ApiModelProperty(value = "是否二手（0否 1是）")
    @NotNull(message = "是否二手不能为空")
    private Integer secondHand;

    @ApiModelProperty(value = "自建订单是否自动确认（0否  1是）")
    private Integer autoConfirm;

    @ApiModelProperty(value = "云仓订单是否自动推送（0否  1是）")
    private Integer autoPush;

    @ApiModelProperty(value = "开启批采功能（0否  1是）")
    private Integer batchPicking;

    @ApiModelProperty(value = "子账号人数")
    private Integer subAccountNumber;

    @ApiModelProperty(value = "是否允许自建 1: 是 0:否")
    private Integer isEurope;

    @ApiModelProperty(value = "注册标识", hidden = true)
    private Boolean isRegister = false;

    @ApiModelProperty(value = "产品类型 1:体验版 2:基础版 3:专业版 4:企业版")
    private Integer productType;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "一键开店id")
    private Integer shopId;

}
